﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace XSTDZ.ERP.Application.DataContracts
{
   public class PermissionDto
    {
       public Guid Id { get; set; }
       [Display(Name = "权限名称")]
       [Required(ErrorMessage = "{0}不能为空!")]
        public string Name { get; set; }
       [Display(Name="URL地址")]
        public string Url { get; set; }

       [Display(Name = "排序数字")]
        public Nullable<int> Order { get; set; }

       [Display(Name = "资源编码不能为空")]
       [Required(ErrorMessage = "资源编码不能为空!")]
        public string Code { get; set; }

       [Display(Name = "控制器名称")]
       [Required(ErrorMessage = "控制器名称不能为空!")]
        public string Controller { get; set; }
       [Display(Name = "动作名称")]
       [Required(ErrorMessage = "动作名称不能为空!")]
        public string Action { get; set; }
       
       public short? Level { get; set; }

       public string TypeName { get; set; }//类别名称
       /// <summary>
       /// 是否显示
       /// </summary>
       public bool IsEnableEdit { get; set; }
       public Guid ParentId { get; set; }

       public UiPermissionDto UiPermission { get; set; }
       
    }
}
